<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
<title>修改记录</title>
<style type="text/css">
<!--
body { background-image: url(static/images/allbg.gif); }
.multipic {
    border: 1px dashed #FC6;
}
.albCt {
    border-bottom: 1px dashed #FC0;
    margin-bottom: 10px;
    padding-bottom:10px;
}
.albCt img{
    cursor:pointer;
}
-->
</style>
<link href="static/style/base.css" rel="stylesheet" type="text/css">
<link href='static/style/tb-box.css' rel='stylesheet' type='text/css' />
<script language="javascript" src="static/js/dedeajax2.js"></script>
<script type="text/javascript" src="static/js/calendar/calendar.js"></script>
<script language='javascript' src="static/js/main.js"></script>
<script type="text/javascript"src="static/js/handlers.js"></script>
<script type="text/javascript" src="static/js/swfupload/swfupload.js"></script>
<script language="javascript" src="static/js/include/jquery/jquery.js"></script>
<script language="javascript" src="static/js/include/jquery/ui.core.js"></script>
<script language="javascript" src="static/js/include/jquery/ui.draggable.js"></script>
<script lang='javascript' src='static/js/tb-box.js'></script>
<script type="text/javascript">
  $(function(){
    // alert();
  });
</script>
<script language="javascript">
<!--
var swfu = null;
var arctype = 'article';
function checkSubmit()
{
    // if(document.form1.title.value=='')
    // {
    //     alert('文章标题不能为空！');
    //     return false;
    // }else {
    //   var val = CKEDITOR.instances.body.getData();
    //   alert(val);
    //   return false;
    // }
    var t1 = document.getElementById("form1").getElementsByTagName("input");
       for(i=0;i<t1.length;i++)
       {
           if(t1[i].type == "checkbox")
           {
               if(!(t1[i].checked))
               {
                   t1[i].checked = true;
                   t1[i].value = "0";
               }
           }
       }
    return true;
}
function addVote()
{
    tb_show('添加投票', 'vote_add.php?isarc=1&TB_iframe=true&height=460&width=600', false);
}

function selectVote()
{
    tb_show('选取投票','vote_main.php?issel=1',false);
}
window.onload = function ()
{
    swfu = new SWFUpload(
    {
        // Backend Settings
        upload_url: "swfupload.php",
        post_params: {"PHPSESSID": "<?php echo session_id(); ?>", "dopost" : "", "arctype" : arctype},

        // File Upload Settings
        file_size_limit : "2 MB",   // 2MB
        file_types : "*.jpg; *.gif; *.png",
        file_types_description : "选择 JPEG/GIF/PNG 格式图片",
        file_upload_limit : "0",

        file_queue_error_handler : fileQueueError,
        file_dialog_complete_handler : fileDialogComplete,
        upload_progress_handler : uploadProgress,
        upload_error_handler : uploadError,
        upload_success_handler : uploadSuccess,
        upload_complete_handler : uploadComplete,

        button_image_url : "../images/SmallSpyGlassWithTransperancy_17x18.png",
        button_placeholder_id : "spanButtonPlaceholder",
        button_width: '100%',
        button_height: 26,
        button_text : '<div class="button" style="background-color:#E5F1CF; height:26px; text-align:center; line-height:26px">上传图片(可多选)</div>',
        button_text_style : '',
        button_text_top_padding: 0,
        button_text_left_padding: 10,
        button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
        button_cursor: SWFUpload.CURSOR.HAND,

        // Flash Settings
        flash_url : "../images/swfupload/swfupload.swf",

        custom_settings : {
            upload_target : "divFileProgressContainer"
        },

        // Debug Settings
        debug: false
    });
};

function addtoEdit(pid)
{
    jQuery.get('swfupload.php?dopost=addtoedit&id=' + pid, function(data)
    {
        var picTitle = jQuery('input[name="picinfook'+pid+'"]').val();
        var picHTML = '<img src="'+data+'" alt="'+picTitle+'"/>';
        CKEDITOR.instances.body.insertHtml(picHTML);
    });
}

//删除已经上传的图片
function delAlbPic(pid){
    // 同步删除编辑器中插入的图片
    jQuery("#__tmpbody").html();
    jQuery.get('swfupload.php?dopost=addtoedit&id=' + pid, function(data)
    {
        var iptbody = CKEDITOR.instances.body.getData();
        jQuery("#__tmpbody").html(iptbody);
        jQuery("#__tmpbody").find('img').each(function()
        {
            if(jQuery(this).attr('src') == data)
            {
                //alert(data);
                jQuery(this).remove();
            }
        });
        CKEDITOR.instances.body.setData(jQuery("#__tmpbody").html());
        jQuery("#__tmpbody").html();
        var tgobj = $Obj('albCtok'+pid);
        var myajax = new DedeAjax(tgobj);
        myajax.SendGet2('swfupload.php?dopost=del&id='+pid);
        $Obj('thumbnails').removeChild(tgobj);
    });
}

//删除已经上传的图片(编辑时用)
function delAlbPicOld(picfile, pid){
    var tgobj = $Obj('albold'+pid);
    var myajax = new DedeAjax(tgobj);
    myajax.SendGet2('swfupload.php?dopost=delold&picfile='+picfile);
    $Obj('thumbnailsEdit').removeChild(tgobj);
}
-->
</script>
</head>
<body topmargin="8">
  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="60%" height="30"><IMG height=14 src="static/images/book1.gif" width=20>&nbsp;<a href="admin.php?ct=wenda&ac=index">问答管理</a>&nbsp;&gt;&gt;&nbsp;修改问答</td>
      <td width="30%" align='right'>&nbsp; </td>
    </tr>
  </table>

  <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" id="head1">
    <tr>
      <td colspan="2">
        <table width="800" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="84" height="24" align="center" background="static/images/itemnote1.gif">&nbsp;常规信息&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </td>
    </tr>
  </table>

<form name="form1" id="form1" action="?ct=wenda&ac=wenda_edit" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit()">
<input type="hidden" name="doedit" value="doedit" />
  <table width="98%"  border="0" align="center" cellpadding="2" cellspacing="2" id="needset" style="border:1px solid #cfcfcf;background:#ffffff;">
    <tr>
      <td height="24" colspan="5" class="bline">
        <table width="800" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="52">&nbsp;问答标题：</td>
            <td width='408'><input name="title" type="text" id="title" value="{dede:var.data.title/}" style="width:388px" /></td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td height="24" colspan="5" class="bline">
        <table width="800" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td  width="10">&nbsp;是否置顶：<input type="checkbox" name="isTop" value="1" {dede:if $GLOBALS['_vars']['data']['isTop'] == "1"}checked="checked"{/dede:if}/></td>
            <td  width="10">&nbsp;是否精彩：<input type="checkbox" name="isGood" value="1" {dede:if $GLOBALS['_vars']['data']['isGood'] == "1"}checked="checked"{/dede:if}/></td>
            <input type="hidden" name="id" value="{dede:var.data.id/}" />
          </tr>
        </table>
       </td>
    </tr>
    <tr>
      <td height="28" colspan="2" bgcolor="#F9FCEF" class="bline2">
        <div style='float:left;line-height:28px;'>&nbsp;<strong>问题解答：</strong></div>
      </td>
    </tr>
    <tr>
      <td width="100%" id="arcBody">
         <?php GetEditor("content",$GLOBALS['_vars']['data']['content'],450,"Diy"); ?>
        </td>
      <td width="255" align="center" valign="top" bgcolor="#FFFFCC" id="mPic" style="display:none"><div class="multipic">
      <div style="display: block;background-color:#E5F1CF; height:26px">
                                <span id="spanButtonPlaceholder"></span>
      </div>
      <div id="divFileProgressContainer"></div>
      <div id="thumbnails" style="width: 254px; height: 535px; background-color: rgb(255, 255, 255); overflow-y: scroll;"></div>
      </div></td>
    </tr>
  </table>
  <table width="98%"  border="0" align="center" cellpadding="2" cellspacing="2" id="adset" style="border:1px solid #cfcfcf;background:#ffffff;">
  </table>
   <table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#F9FCEF" style="border:1px solid #cfcfcf;border-top:none;">
   <tr height="35">
    <td width="17%">&nbsp;</td>
    <td width="83%"><input name="imageField" type="image" src="static/images/button_save.gif" width="60" height="22" class="np" border="0"  style="cursor:pointer;"/>
       <img src="static/images/button_reset.gif" width="60" height="22" border="0" onClick="location.reload();" style="cursor:pointer; "/>
    </td>
   </tr>
</table>
</form>
<div id="__tmpbody" style="display:none"></div>
<script language='javascript'>InitPage();</script>
</body>
</html>